﻿#region The Demo Of Coding Standard
//Title:Demo Of Coding Standard
//Description:
//Author:Aaron Chou
//Date:200909251550
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;

namespace SZDomain.Aaron.Demo.Standard
{
    public delegate void UpdateCallback(object o);
    public delegate void ExecuteEventHandler(object sender,EventArgs e);
    /// <summary>
    /// demoClass
    /// </summary>
    public class CodingStandard:Page
    {
        public CodingStandard()
        { 
              
        }

        /// <summary>
        /// 
        /// </summary>
        private object CallbackSender = new object();

        /// <summary>
        /// 
        /// </summary>
        private object EventHandlerSender = new object();

        public event ExecuteEventHandler execute
        {
            add {
                this.Events.AddHandler(EventHandlerSender, value);
            }
            remove {
                this.Events.RemoveHandler(EventHandlerSender, value);
            }
        }

        public void OnExecute(object sender, EventArgs e)
        {
            
        }

        
        
    }

    /// <summary>
    /// Static tool member provider
    /// </summary>
    public class Tool
    {
        /// <summary>
        /// 
        /// </summary>
        private Tool()
        { 
        
        }

        /// <summary>
        /// 
        /// </summary>
        public static string name = string.Empty;

        /// <summary>
        /// 
        /// </summary>
        public static object lockMan = new object();

        /// <summary>
        /// 
        /// </summary>
        public static Tool current;
        
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public static Tool GetInstance()
        {
            lock (lockMan)
            {
                if (current != null)
                {
                    return current;
                }
                else {
                    current = new Tool();
                    return current;
                }
            }
        }
    }
}
